<template>
    <view class="container">
        <view v-if="selectList.length" class="list">
            <view v-for="(item, index) in selectList" :key="index" class="row">
                <view class="item">
                    <view>包裹</view>
                    <view>:</view>
                    <view>{{ index + 1 }}</view>
                </view>
 <!--               <view class="item">
                    <view>商品编码</view>
                    <view>:</view>
                    <view>{{ item.shangpinbianma }}</view>
                </view>
                <view class="item">
                    <view>商品名称</view>
                    <view>:</view>
                    <view>{{ item.shangpinming }}</view>
                </view>
                <view class="item">
                    <view>商品数量</view>
                    <view>:</view>
                    <view>{{ item.shangpinshuliang }}</view>
                </view> -->
                <view class="item">
                    <view>公司名称</view>
                    <view>:</view>
                    <view>{{ item.wuliugongsi }}</view>
                </view>
                <view class="item">
                    <view>物流费用</view>
                    <view>:</view>
                    <view>¥{{ item.wuliufeiyong }}</view>
                </view>
                <view class="item">
                    <view>发货单号</view>
                    <view>:</view>
                    <view>{{ item.wuliudanhao }}</view>
                </view>
                <view class="item">
                    <view>物流电话</view>
                    <view>:</view>
                    <view>{{ item.wuliudianhua }}</view>
                </view>
				<view class="goods_list" style="margin-top: 20rpx;">
					<view style="font-size: 28rpx;">商品:</view>
					<view v-for="(items,indexs) in item.wuliushangpin" style="margin-bottom: 20rpx;">
					    <view class="item" :key="indexs">
					        <view>商品编码</view>
					        <view>:</view>
					        <view>{{ items.shangpinbianma }}</view>
					    </view>
						<view class="item" :key="indexs">
						    <view>商品名称</view>
						    <view>:</view>
						    <view>{{ items.shangpinming }}</view>
						</view>
						<view class="item" :key="indexs">
						    <view>商品数量</view>
						    <view>:</view>
						    <view>{{ items.shangpinshuliang }}</view>
						</view>
					</view>
				</view>
            </view>
        </view>
        <view v-else style="text-align: center;">暂无数据</view>
    </view>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    onLoad(options) {
        const eventChannel = this.getOpenerEventChannel();
        let that = this
        // 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
        eventChannel.on('emitDataHandle', function(data) {
            console.log(data)
            that.selectList = data.data || []
        })
    }
}
</script>

<style lang="scss" scoped>
.container {
    padding: 32rpx 28rpx;
    background: rgba(247, 248, 250, 1);
    .list {
        border-radius: 12rpx;
        background: rgba(255, 255, 255, 1);
        padding: 28rpx;
        .item {
            display: flex;
            >view:nth-child(1) {
                font-size: 28rpx;
                font-weight: 400;
                color: rgba(103, 117, 133, 1);
                width: 112rpx;
                display: inline-block;
                text-align-last: justify;
            }
            >view:nth-child(2) {
                font-size: 28rpx;
                font-weight: 400;
                color: rgba(103, 117, 133, 1);
                margin-right: 20rpx;
            }
            >view:nth-child(3) {
                font-size: 28rpx;
                font-weight: 500;
                color: rgba(12, 16, 25, 1);
                flex: 1;
            }
        }
    }
}
</style>